package lium.lbs.lbsim.pay.alipayutils;

import android.os.Bundle;
import com.lmlibrary.Constants;
import lium.lbs.lbsim.jgchat.activity.BaseActivity;
import lium.lbs.lbsim.R;


public class ZFBActivity extends BaseActivity {
    private String orderSN;
    private String priceOder;
    private String title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    private void initView() {
        orderSN = getIntent().getStringExtra("orderSN");
        priceOder = getIntent().getStringExtra("needMoney");
        title = getIntent().getStringExtra("title");

        MyALipayUtils.ALiPayBuilder builder = new MyALipayUtils.ALiPayBuilder();
        builder.setAppid(Constants.XFBAppID)
                .setRsa2(Constants.rsa2PrivateKey)//根据情况设置Rsa2与Rsa。这里一定要换成正确的私钥，不然会报错
                .setMoney(priceOder)//单位时分
                .setTitle(title)
                .setOrderTradeId(orderSN)//从服务端获取
                .setNotifyUrl(Constants.Host + "/aliPay/asynNotify")//从服务端获取
                .build()
                .toALiPay(ZFBActivity.this);
    }

}
